package com.reins.bookstore.Utils;

import net.sf.json.JSONArray;
import net.sf.json.JSONNull;
import net.sf.json.JSONObject;
import org.springframework.http.HttpStatus;

/***
 * Reques-Response Utils
 */
public class RRUtils {

    public RRUtils(String url,
                   JSONObject request_body,
                   int expect_status,
                   String expect_msg,
                   JSONObject expect_data){
        this.url  = url;
        this.request_body = request_body;
        this.expect_status = expect_status;
        this.expect_msg = expect_msg;
        this.expect_data = expect_data;
    }

    public String url;
    public JSONObject request_body;
    public int expect_status;
    public String expect_msg;
    public JSONObject expect_data;          // 默认得到的结果的数据是object
    public Boolean use_array = false;       // 根据这个设置来决定在assert部分用array来和结果比较还是用object来和结果比较
    public JSONArray expect_array = null;   // 根据需求设置array的预期内容
    public int httpStatus = 200;            // http状态，一般是200或者404(地址错误)


}
